Code examples for the database tag - developer knowledge base ()

Learn how to create a Ruby on Rails migration with an example.
Learn how to write SQL queries in Ruby on Rails with an example, from building a basic query to advanced search techniques.
Ruby on Rails migrations: an example of how to create, manage, and rollback database schema changes.
Learn how to use Ruby on Rails and SQLite3 with an example: create a web app and interact with a database.
Troubleshoot WordPress database connection errors with an example of the 'Error establishing a database connection' message.
Learn how to count the number of records in a Laravel table with an example.
Learn how to extract data from Laravel models with an example.
Learn how to insert records into a Laravel table with an example.
Learn how to delete a record from a Laravel DB w/ an example: Create a controller, define a route, use Eloquent's delete() method.
Learn how to retrieve data from Laravel's database using Eloquent ORM, with a step-by-step example.
Learn how to add a column to a Laravel table with an example in this easy-to-follow guide.
Learn how to add a field to your Laravel database table with an example.
Learn how to update only one field in Laravel with an example.
Update your Laravel table with a step-by-step guide, including example code.
Learn how to update migrations in Laravel with an example for easy database management.
Update records in Laravel with an example: Learn how to update records using Eloquent, query builder and raw SQL.
Learn how to delete all Laravel models with an example. See how to quickly & easily clean up your database.
Learn how to easily retrieve all users from Laravel with an example.
Laravel: learn how to delete all migrations with a simple example.
Learn how to rollback a single Laravel migration, with a step-by-step example.
1